home *** CD-ROM | disk | FTP | other *** search
- /* MTASK V1.0
-
- A minimal multitasking library for DOS. Copyright 1993 I H Ting.
-
- Disclaimer:
- Use the code at your own peril. I don't promise it actually does anything.
- Even if the world ends when you use it, don't hold me responsible.
-
- Comments and suggestions, however, are welcomed. I can be reached at:
-
- Compuserve ID: 100023,3363
- Internet: cm1826@ccub.wlv.ac.uk
-
- */
-
- #ifndef MTASK_H
- #define MTASK_H
-
- /* Change these to suit your application */
- #define MAX_TASKS 40
- #define TASK_STACK_SIZE 4096
-
-
- typedef int (far *PTaskFunc) (void);
-
- /* These are the functions you can call */
- void InitMultiTasking(void);
- int AddNewTask(PTaskFunc pTaskFunc);
- void interrupt StartMultiTasking(void);
- void RemoveTask(unsigned taskID);
- void EndMultiTasking(void);
- void MTWait(unsigned *semaphore);
- void MTSignal(unsigned *semaphore);
- void MTPuts(char *s);
- void MTXYPuts(int x,int y,char *s);
- char MTGetch(void);
- void MTPutch(char c);
- void MTXYPutch(int x, int y, char c);
-
- #endif
-